/*
 * $Id: ItemBaseByCodeFilter.java 15 2013-05-16 05:43:09Z antonyhands@gmail.com $
 */
package ru.olympus.antonyhands.ao.data.util;

import ru.olympus.antonyhands.ao.data.entities.AOItemBase;

import com.google.common.base.Predicate;

/**
 * @author AntonyHands
 * @since 15.05.2013
 */
public class ItemBaseByCodeFilter implements Predicate<AOItemBase>
{
    private String _code;

    public ItemBaseByCodeFilter(String code)
    {
        _code = code;
    }

    @Override
    public boolean apply(AOItemBase itemBase)
    {
        return itemBase.getCode().equals(_code);
    }

}
